<%--
  Created by IntelliJ IDEA.
  User: HP
  Date: 2020-11-28
  Time: 下午 02:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="${pageContext.request.contextPath}/resources/js/jquery-3.5.1.min.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/layuiadmin/layui/css/layui.css" />
</head>
<body>
<table class="layui-hide" id="test"></table>


<script src="${pageContext.request.contextPath}/resources/layuiadmin/layui/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->

<script>
    layui.use('table', function(){
        var table = layui.table;

        table.render({
            elem: '#test'
            ,url:'StudentInfoServlet'
            ,cols: [[
                ,{field:'id', width:80, title: 'ID', sort: true}
                ,{field:'name', width:80, title: '姓名'}
                ,{field:'sex', width:80, title: '性别', sort: true}
                ,{field:'birthday', width:120, title: '生日'}
                ,{field:'hobby', width:100,templet: '<div>{{d.hobby.hobbyName}}</div>'}
            ]]
            ,page: true
        });
    });
</script>
</body>
</html>
